
import './App.css'
import '@/css/nav.css'
import { routes } from '@/routers';
import { Routes, Route, Outlet, Link, useNavigate, useRoutes } from 'react-router-dom';
import { Nav } from './components/Nav/Nav';
import { useState } from 'react';

function App() {
  const [navItems] = useState([
    { name: 'Home', to: '/' },
    { name: 'About', to: '/about' }
  ])
  const navigation = useNavigate()
  // 随机数
  const random = () => {
    return Math.floor(Math.random() * 1000);
  }

  return (
    <div className="App">
      {/* <Nav navItems={navItems} random={random} navigation={navigation} /> */}
      {useRoutes(routes)}
    </div >
  );
}






export default App
